package com.jlcindia.struts2;

import java.util.*;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class JLCInterceptor implements Interceptor {

	
	public void destroy() {
		

	}

	
	public void init() {
		

	}

	
	public String intercept(ActionInvocation invocation) throws Exception {
		System.out.println("Pre Processing Code of IPInterceptor Here");
		ActionContext ac=invocation.getInvocationContext();
		Map sessionMap=ac.getSession();
		sessionMap.put("JLCMSG", "WELcome to JLC");
		String result=invocation.invoke();
		System.out.println("post processing code");
		
		return result;
	}

}
